package jsu.blogger.mapper;

import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface UserTagsMapper {
    @Select("select tag_id from blog_system_database.user_tags where user_id=#{userId}")
    List<Long> selectTagIdListByUserId(Long userId);

    @Delete("delete from blog_system_database.user_tags where user_id=#{userId}")
    void deleteUserTagsByUserId(Long userId);

    @Insert("insert into blog_system_database.user_tags values (#{userId},#{tagId})")
    void insertUserTags(@Param("userId") Long userId,@Param("tagId")Long tagId);
}
